import request from '@/utils/request'

// 查询种植管理列表
export function listPlantProcessInfo(query) {
  return request({
    url: '/TPlantProcessInfo/plantProcessInfo/list',
    method: 'get',
    params: query
  })
}




// 修改种植管理
export function updatePlantProcessInfo(data) {
  return request({
    url: '/TPlantProcessInfo/plantProcessInfo',
    method: 'put',
    data: data
  })
}

// 删除种植管理
export function delPlantProcessInfo(id) {
  return request({
    url: '/TPlantProcessInfo/plantProcessInfo/' + id,
    method: 'delete'
  })
}

// 导出种植管理
export function exportPlantProcessInfo(query) {
  return request({
    url: '/TPlantProcessInfo/plantProcessInfo/export',
    method: 'get',
    params: query
  })
}


// 查询投入品购买信息列表
export function listPurchaseInfo(query) {
  return request({
    url: '/purchase/purchaseInfo/list',
    method: 'get',
    params: query
  })
}



// 化肥农药
// 查询农药或者
export function getHuafeiInfo(query,record_type) {
  return request({
    url: `/IPlantProcessRecordInfo/recordInfo/get/${record_type}`,
    method: 'get',
    params: query
  })
}
// 查询化肥单条详细信息
export function getHuafeiInfoedit(id) {
  return request({
    url: `/IPlantProcessRecordInfo/recordInfo/${id}`,
    method: 'get'
  })
}
// 查询种植管理详细
export function getPlantProcessInfo(id) {
  return request({
    url: '/TPlantProcessInfo/plantProcessInfo/' + id,
    method: 'get'
  })
}
// 修改化肥农药记录
export function updatePlantProcessInfoHua(data) {
  return request({
    url: '/IPlantProcessRecordInfo/recordInfo/edit',
    method: 'put',
    data: data
  })
}


// 删除化肥管理
export function delPlantProcessInfoHua(id) {
  return request({
    url: `/IPlantProcessRecordInfo/recordInfo/del/${id}`,
    method: 'delete'
  })
}

// 新增种植管理
export function addPlantProcessInfoHua(data) {
  return request({
    url: '/IPlantProcessRecordInfo/recordInfo',
    method: 'post',
    data: data
  })
}